#include <iostream>
using namespace std;

int main() {
  float h;
  int p;
  cin >> h >> p;
  int money = p * 2;
  if (h < 1.2) {
    cout << money << endl;
  } else {
    // 嵌套选择结构
    if (h >= 1.2 && h <= 1.5) {
      cout << money + p / 2 << endl;
    } else {
      cout << money + p << endl;
    }
  }

  // else-if 结构
  if (h < 1.2) {
    cout << money << endl;
  } else if (h >= 1.2 && h <= 1.5) {
    cout << money + p / 2 << endl;
  } else {
    cout << money + p << endl;
  }
  return 0;
}